﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AMDev.BNET.ClientAPI.WoW
{
    /// <summary>
    /// Dedicated collection class used to store Realm Status information when data is received and deserialized from the Community API sites.
    /// </summary>
    public class WoWRealmsCollection
        : List<WoWRealm>
    {
        #region .ctor

        public WoWRealmsCollection()
            : base()
        {
        }

        public WoWRealmsCollection(IEnumerable<WoWRealm> collection)
            : base(collection)
        {
        }

        public WoWRealmsCollection(int capacity)
            : base(capacity)
        {
        }

        #endregion

        #region Methods

        public override string ToString()
        {
            StringBuilder toStringText = null;

            toStringText = new StringBuilder();
            foreach(WoWRealm wr in this)
                toStringText.AppendLine(wr.ToString());
            return toStringText.ToString();
        }

        #endregion
    }
}
